package com.unitedvision.core;

import java.util.ArrayList;
import java.util.List;

@SuppressWarnings("rawtypes")
public class CollectionConverter<T, S> {
	private static CollectionConverter instance;
	
	private CollectionConverter() {
		super();
	}

	public static CollectionConverter getInstance() {
		if (instance == null)
			instance = new CollectionConverter();
		return instance;
	}
	
	@SuppressWarnings("unchecked")
	public List<T> convert(List<S> ls) {
		List<T> list = new ArrayList<>();
		
		for (S s : ls) {
			list.add((T)s);
		}
		
		return list;
	}
}
